/* ===================================
   缩略图侧边栏样式
   =================================== */

#thumbnail-sidebar {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 200px;
  height: calc(100vh - 40px);
  overflow-y: auto;
  padding-top: 20px;
  box-sizing: border-box;
  margin-left: 0;
  order: 1;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e0 #f8fafc;
}

#thumbnail-sidebar::-webkit-scrollbar {
  width: 8px;
}

#thumbnail-sidebar::-webkit-scrollbar-track {
  background: #f8fafc;
  border-radius: 8px;
}

#thumbnail-sidebar::-webkit-scrollbar-thumb {
  background-color: #cbd5e0;
  border-radius: 8px;
  border: 2px solid #f8fafc;
}

#thumbnail-sidebar .thumbnail-card {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 25px;
  transition: transform 0.2s, box-shadow 0.2s;
}

#thumbnail-sidebar .thumbnail-card:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

#thumbnail-sidebar .thumbnail-card h2 {
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 12px;
  margin-bottom: 20px;
  color: #2c3e50;
  font-size: 1.4em;
  text-align: center;
}

#thumbnail-sidebar ul#thumbnailList {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#thumbnail-sidebar ul#thumbnailList li {
  margin-bottom: 10px;
  cursor: pointer;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 5px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

#thumbnail-sidebar .thumbnail-item {
  margin-bottom: 10px;
  cursor: pointer;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 5px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

#thumbnail-sidebar ul#thumbnailList li.active,
#thumbnail-sidebar ul#thumbnailList li:hover {
  border-color: #3498db;
  position: relative;
  box-shadow: 0 0 8px rgba(52, 152, 219, 0.5);
  transform: translateY(-2px);
}

#thumbnail-sidebar .thumbnail-item.active,
#thumbnail-sidebar .thumbnail-item:hover {
  border-color: #3498db;
  position: relative;
  box-shadow: 0 0 8px rgba(52, 152, 219, 0.5);
  transform: translateY(-2px);
}

#thumbnail-sidebar ul#thumbnailList li.active:before {
  content: '●';
  position: absolute;
  top: 5px;
  left: 5px;
  color: #3498db;
  font-size: 18px;
  z-index: 10;
  text-shadow: 0 0 3px white;
  font-weight: bold;
}

#thumbnail-sidebar ul#thumbnailList li.active:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 3px solid #3498db;
  border-radius: 4px;
  box-sizing: border-box;
}

#thumbnail-sidebar ul#thumbnailList li img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

#thumbnail-sidebar .thumbnail-item img,
#thumbnail-sidebar .thumbnail-image {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* 翻译中消息样式 */
.translating-message {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px;
  font-size: 12px;
  text-align: center;
  border-radius: 0 0 4px 4px;
}

/* 处理中指示器 */
.thumbnail-processing-indicator {
  position: absolute;
  top: 5px;
  right: 5px;
  background-color: rgba(53, 152, 219, 0.8);
  color: white;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  z-index: 9;
  animation: pulse 1.5s infinite;
}

/* 错误指示器 */
.error-indicator {
  position: absolute;
  top: 5px;
  right: 5px;
  background-color: #f44336;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  text-align: center;
  line-height: 20px;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 2;
}

/* 翻译失败标记 */
.translation-failed-indicator {
  position: absolute;
  bottom: 3px;
  right: 3px;
  background-color: rgba(255, 0, 0, 0.8);
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  z-index: 11;
  box-shadow: 0 0 3px black;
}

/* 手动标注指示器 */
.labeled-indicator {
  position: absolute;
  bottom: 3px;
  right: 3px;
  background-color: rgba(0, 123, 255, 0.8);
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  z-index: 10;
  box-shadow: 0 0 3px black;
}

.thumbnail-item.has-manual-labels {
  border: 2px solid #4caf50;
}

#thumbnail-sidebar .thumbnail-item.has-manual-labels {
  border-left: 4px solid #007bff;
}
